package com.tedu.pojo;

import lombok.AllArgsConstructor;
import lombok.Data;
import lombok.NoArgsConstructor;
import lombok.experimental.Accessors;
import org.springframework.beans.factory.annotation.Value;
import org.springframework.boot.context.properties.ConfigurationProperties;
import org.springframework.stereotype.Component;

/**
 * Author：毕龙
 * Date: 2023/12/21 20:01
 * @Data  添加get 、 set方法
 * @Accessors(chain = true)  表示方法是以连的形式存在
 */
@Component
@Data
@AllArgsConstructor //有参构造
@NoArgsConstructor //无参构造
@Accessors(chain = true)
@ConfigurationProperties(prefix = "stu")
public class Student {
    @Value("郭蕊")
    private String name;

    @Value("18")
    private Integer age;

}
